package com.cq.hd.member.api;

import com.cq.hd.common.pagination.Page;
import com.cq.hd.common.response.Result;
import com.cq.hd.member.api.dto.*;
import com.cq.hd.member.api.vo.AgentBindApplyPageVo;
import com.cq.hd.member.api.vo.AgentBindApplyVo;
import com.cq.hd.member.api.vo.MyAgentBindApplyPageVo;
import com.cq.hd.member.api.vo.PreAgentApplyVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "hd-o2o-member-service", contextId = "agent-bind-apply-api")
public interface TbAgentBindApplyApi {
    // 经纪人入驻预申请（供用户点击入驻申请链接调用）
    @PostMapping("/member/agentBindApply/preApply")
    Result<PreAgentApplyVo> preApply(@RequestBody PreAgentEnterApplyDto preAgentApplyMerchantDto);

    // 经纪人绑定申请
    @PostMapping("/member/agentBindApply/apply")
    Result<AgentBindApplyVo> apply(@RequestBody AgentBindApplyDto agentApplyDto);

    // 待审核经纪人数量
    @PostMapping("/member/agentBindApply/waitAuditCount")
    Result<Integer> waitAuditCount(@RequestParam("inviterUserId") Long inviterUserId);

    // 入驻申请列表
    @PostMapping("/member/agentBindApply/page")
    Result<Page<AgentBindApplyPageVo>> page(@RequestBody AgentBindApplyPageDto agentBindApplyPageDto);

    // 我的入驻申请列表
    @PostMapping("/member/agentBindApply/myApplyPage")
    Result<Page<MyAgentBindApplyPageVo>> myApplyPage(@RequestBody MyAgentBindApplyPageDto myAgentBindApplyPageDto);

    // 审核经纪人绑定申请
    @PostMapping("/member/agentBindApply/audit")
    Result<Boolean> audit(@RequestBody AgentBindApplyAuditDto agentBindApplyAuditDto);
}
